const express = require("express");
const bodyParser = require("body-parser");
// 功能模块
const login = require("./modules/login")
const register = require("./modules/register")

const app = express();

app.use(express.static("./www"));
app.use(bodyParser());

const userMsg = [];

// 将功能模块，绑定到指定路径
app.get("/login", login(userMsg));
app.post("/register", register(userMsg));

app.listen(3000);